package ar.com.ford.it.fullEconomics.view.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

public class BatchPendingMixProcessAction extends Action {
	
	// Agregado por LSPARACI
	public ActionForward execute(ActionMapping mapping, ActionForm form,
            HttpServletRequest request, HttpServletResponse response)
             
    {
       /*try {
          System.out.println("Ejecutando BatchPendingMixProcessAction.Execute...");
       } catch(Exception e) {e.printStackTrace();
	      System.out.println("Fallo la ejecucion de BatchPendingMixProcessAction.Execute");
       }
       
		ActionMessages am = new ActionMessages();
		//FullEconomicsWslxUser user = (FullEconomicsWslxUser) webSession
		//		.getUser();
	//	FullEconomicsWslxUser user = request.getUserPrincipal().getName();
	// LSPARACI		
		FullEconomicsWslxUser user = new FullEconomicsWslxUser("p_feefmc");
		
			
		ProductionVolumesMixFacade productionvolumesMixFacade = (ProductionVolumesMixFacade) FacadeProvider
				.getFacade(request, ProductionVolumesMixFacade.class);

		try {

			productionvolumesMixFacade.processMix(user.getTeesg01Plant(), user);

			am.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(
					"productionVolumesMix.info.pendientes.fin"));
			saveMessages(request, am);

		} catch (FullEconomicsException e) {
			am.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(e
					.getMessageResource()));
			saveErrors(request, am);
		}
*/
		//return null;
		return mapping.findForward("success");
	}
}
